<template>
  <!--   机审报告-->
  <Table border max-height="400px" :header-style="{backgroundColor:'#fffbed'}" :table-data="tableData"
         :page="false">
    <el-table-column prop="rulesKey" :label="$t('规则key')" align="center"></el-table-column>
    <el-table-column prop="rulesValue" :label="$t('规则值')" align="center">
      <template slot-scope="{row}">
        <span v-if="row.rulesValue === '1'" style="color: #13ce66;font-size: 14px">{{ $t('通过') }}</span>
        <span v-else style="color: #ff4949;font-size: 14px">{{ $t('不通过') }}</span>
      </template>
    </el-table-column>
    <el-table-column prop="rulesDescribe" :label="$t('描述')" align="center"></el-table-column>
  </Table>

</template>

<script>
import {rulesReport} from '@/api/order'
export default {
  props: ['routesQuery'],
  name: "machineReview",
  data() {
    return {
      tableData: [],
      tableColumn: [
        {label: this.$t('规则key'), prop: 'rulesKey', align: 'center'},
        {label: this.$t('规则值'), prop: 'rulesValue', align: 'center'},
        {label: this.$t('描述'), prop: 'rulesDescribe', align: 'center'},
      ]
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    async getList() {
      const {orderId} = this.routesQuery
      const res = await rulesReport({
        loanRecordId: orderId
      })
      if (res.code === 1) {
        this.tableData = res.data
      }
    }
  }
}
</script>

<style scoped>

</style>
